<template>
  <div class="plan-panel">
    <div class="panel-title">隧道群群控预案</div>
    <div class="panel-content">
      <table class="plan-table">
        <thead>
          <tr>
            <th>隧道群</th>
            <th>预案名称</th>
            <th>预案类型</th>
            <th>是否执行</th>
            <th>操作人</th>
          </tr>
        </thead>
        <tbody>
          <tr v-for="(plan, index) in planData" :key="index" class="plan-row" :class="{ 'striped': index % 2 === 1 }">
            <td>{{ plan.tunnelGroup }}</td>
            <td>{{ plan.name }}</td>
            <td>{{ plan.type }}</td>
            <td>{{ plan.executed }}</td>
            <td>{{ plan.operator }}</td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue';

// 模拟数据
const planData = ref([
  { tunnelGroup: 'xx隧道群', name: '交通诱导全部关闭', type: '火灾预案', executed: '是', operator: '张三' },
  { tunnelGroup: 'xx隧道群', name: '交通诱导全部关闭', type: '事故预案', executed: '否', operator: '李四' },
  { tunnelGroup: 'xx隧道群', name: '交通诱导全部关闭', type: '火灾预案', executed: '否', operator: '张三' },
  { tunnelGroup: 'xx隧道群', name: '交通诱导全部关闭', type: '事故预案', executed: '是', operator: '张三' },
  { tunnelGroup: 'xx隧道群', name: '交通诱导全部关闭', type: '火灾预案', executed: '是', operator: '张三' },
  { tunnelGroup: 'xx隧道群', name: '交通诱导全部关闭', type: '事故预案', executed: '否', operator: '张三' },
  { tunnelGroup: 'xx隧道群', name: '交通诱导全部关闭', type: '事故预案', executed: '是', operator: '张三' },
]);
</script>

<style lang="scss" scoped>
.plan-panel {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;

  .panel-title {
    background: url("@/assets/image/TunnelOverviewPanel/组 2.png") no-repeat center/cover;
    width: 452px;
    height: 43px;
    padding: 3px 0 25px 30px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-align: left;
  }

  .panel-content {
    width: 100%;
    background: url("@/assets/image/deviceOverview/1111111111111.png") no-repeat center/cover;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 410px;
    overflow: auto;
  }

  .plan-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #153552;
    
    th, td {
      padding: 12px 15px;
      text-align: center;
      color: #fff;
      position: relative;
      font-size: 14px;
      font-family: inherit;
      border: 1px solid #153552;
    }
    
    th {
      background-color: #21597F;
      color: #fff;
      font-weight: normal;
    }
    
    .plan-row {
      transition: background-color 0.2s ease;
      
      &.striped {
        background-color: #0E3048;
      }
      
      &:hover {
        background-color: #1B5D91;
      }
    }
  }
}
</style> 